package com.example.administrator.yuejian_15.model;


import com.example.administrator.yuejian_15.bean.LoginBean;
import com.example.administrator.yuejian_15.iface.LoginIface;
import com.example.administrator.yuejian_15.listener.TListener;
import com.example.administrator.yuejian_15.service.AllService;

import retrofit2.Call;
import retrofit2.Retrofit;

public class LoginModel extends RetrofitBaseModel implements LoginIface<LoginBean> {

    private AllService allService;
    private Retrofit retrofit;
    public LoginModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }

    @Override
    public void login(String username, String password, TListener<LoginBean> tListener) {
        Call<LoginBean> call = allService.login(username,password);
        callenqueue(call,tListener);

    }
}
